package aop05;

import exception.SomeException;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/3/8 10:20
 * Version:1.0-SNAPSHOT
 */
public class SomeServiceImpl implements SomeService {
    @Override
    public String doSome(String s) {
        System.out.println("一个参数有返回值的doSome");
        return s;
    }

    @Override
    public void doSome() {
        System.out.println("无参无返回值doSome");
    }

    @Override
    public String doSome(String s, String s2) {
        System.out.println("两个参数有返回值的doSome");
        return s+s2;
    }

    @Override
    public void doOther() throws SomeException {
        System.out.println("SomeServiceImpl.doOther");
        throw new SomeException("执行SomeService的doOther方法遇到了异常");
    }

    @Override
    public void login(String username,String password) {
        System.out.println("SomeServiceImpl.login");
    }

    @Override
    public void register() {
        System.out.println("SomeServiceImpl.register");
    }
}
